﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace U8WebAPI
{
    
    /// <summary>
    /// 审核请求数据类
    /// </summary>
    public class AuditRequest
    {
        /// <summary>
        /// 外部系统请求GUID
        /// </summary>
        public string ExtSysRequestGUID;
        /// <summary>
        /// 单据类型代码
        /// </summary>
        public string VouchCode;
        /// <summary>
        /// MES操作员
        /// </summary>
        public string MESUserName;
        /// <summary>
        /// 单据Id
        /// </summary>
        public int VoucherId;

        public AuditRequest()
        {
            this.ExtSysRequestGUID = "";
            this.VouchCode = "";
            this.MESUserName = "";
            this.VoucherId = 0;
        }
    }

    /// <summary>
    /// 参照生单请求数据类
    /// </summary>
    public class PushRequest
    {
        /// <summary>
        /// 外部系统请求GUID
        /// </summary>
        public string ExtSysRequestGUID;
        /// <summary>
        /// 参照单据类型代码
        /// </summary>
        public string SourceVouchCode;
        /// <summary>
        /// 生成单据类型代码
        /// </summary>
        public string TargetVouchCode;
        /// <summary>
        /// 单据编号
        /// </summary>
        public string VoucherName;
        /// <summary>
        /// MES操作员
        /// </summary>
        public string MESUserName;
        /// <summary>
        /// 业务类型编号
        /// </summary>
        public string BusType;
        /// <summary>
        /// 部门编号
        /// </summary>
        public string DepCode;
        /// <summary>
        /// 仓库编号
        /// </summary>
        public string WhCode;
        /// <summary>
        /// 红蓝标识 (0蓝字/1红字)
        /// </summary>
        public int Bredvouch;
        /// <summary>
        /// 表头备注
        /// </summary>
        public string Memo;
        /// <summary>
        /// 表头自定义项1
        /// </summary>
        public string cDefine1;
        /// <summary>
        /// 表头自定义项12
        /// </summary>
        public string cDefine2;
        /// <summary>
        /// 表头自定义项3
        /// </summary>
        public string cDefine3;
        /// <summary>
        /// 表头自定义项4
        /// </summary>
        public string cDefine4;
        /// <summary>
        /// 表头自定义项5
        /// </summary>
        public int cDefine5;
        /// <summary>
        /// 表头自定义项6
        /// </summary>
        public string cDefine6;
        /// <summary>
        /// 表头自定义项7
        /// </summary>
        public float cDefine7;
        /// <summary>
        /// 表头自定义项8
        /// </summary>
        public string cDefine8;
        /// <summary>
        /// 表头自定义项9
        /// </summary>
        public string cDefine9;
        /// <summary>
        /// 表头自定义项10
        /// </summary>
        public string cDefine10;
        /// <summary>
        /// 表头自定义项11
        /// </summary>
        public string cDefine11;
        /// <summary>
        /// 表头自定义项12
        /// </summary>
        public string cDefine12;
        /// <summary>
        /// 表头自定义项13
        /// </summary>
        public string cDefine13;
        /// <summary>
        /// 表头自定义项14
        /// </summary>
        public string cDefine14;
        /// <summary>
        /// 表头自定义项15
        /// </summary>
        public int cDefine15;
        /// <summary>
        /// 表头自定义项16
        /// </summary>
        public float cDefine16;
        /// <summary>
        /// 行明细
        /// </summary>
        public List<PushRequestItem> Rows;

        public PushRequest()
        {
            this.ExtSysRequestGUID = "";
            this.SourceVouchCode = "";
            this.TargetVouchCode = "";
            this.VoucherName = "";
            this.MESUserName = "";
            this.BusType = "";
            this.DepCode = "";
            this.WhCode = "";
            this.Bredvouch = -1;
            this.Memo = "";
            this.cDefine1 = "";
            this.cDefine2 = "";
            this.cDefine3 = "";
            this.cDefine4 = "";
            this.cDefine5 = 0;
            this.cDefine6 = "";
            this.cDefine7 = 0;
            this.cDefine8 = "";
            this.cDefine9 = "";
            this.cDefine10 = "";
            this.cDefine11 = "";
            this.cDefine12 = "";
            this.cDefine13 = "";
            this.cDefine14 = "";
            this.cDefine15 = 0;
            this.cDefine16 = 0;
            this.Rows = new List<PushRequestItem>();
        }
    }
    public class PushRequestItem
    {
        /// <summary>
        /// 物料编码
        /// </summary>
        public string InvCode;
        /// <summary>
        /// 数量
        /// </summary>
        public decimal Quantity;
        /// <summary>
        /// 参照单据Id
        /// </summary>
        public int SourceId;
        /// <summary>
        /// 参照单据行Id
        /// </summary>
        public int SourceAutoId;
        /// <summary>
        /// 批次号
        /// </summary>
        public string Batch;
        /// <summary>
        /// 表体备注
        /// </summary>
        public string bMemo;
        /// <summary>
        /// 表体自定义项22
        /// </summary>
        public string cDefine22;
        /// <summary>
        /// 表体自定义项23
        /// </summary>
        public string cDefine23;
        /// <summary>
        /// 表体自定义项24
        /// </summary>
        public string cDefine24;
        /// <summary>
        /// 表体自定义项25
        /// </summary>
        public string cDefine25;
        /// <summary>
        /// 表体自定义项26
        /// </summary>
        public float cDefine26;
        /// <summary>
        /// 表体自定义项27
        /// </summary>
        public float cDefine27;
        /// <summary>
        /// 表体自定义项28
        /// </summary>
        public string cDefine28;
        /// <summary>
        /// 表体自定义项29
        /// </summary>
        public string cDefine29;
        /// <summary>
        /// 表体自定义项30
        /// </summary>
        public string cDefine30;
        /// <summary>
        /// 表体自定义项31
        /// </summary>
        public string cDefine31;
        /// <summary>
        /// 表体自定义项32
        /// </summary>
        public string cDefine32;
        /// <summary>
        /// 表体自定义项33
        /// </summary>
        public string cDefine33;
        /// <summary>
        /// 表体自定义项34
        /// </summary>
        public int cDefine34;
        /// <summary>
        /// 表体自定义项35
        /// </summary>
        public int cDefine35;
        /// <summary>
        /// 表体自定义项36
        /// </summary>
        public string cDefine36;
        /// <summary>
        /// 表体自定义项37
        /// </summary>
        public string cDefine37;

        public PushRequestItem()
        {
            this.InvCode = "";
            this.Quantity = 0;
            this.SourceId = 0;
            this.SourceAutoId = 0;
            this.Batch = "";
            this.bMemo = "";
            this.cDefine22 = "";
            this.cDefine23 = "";
            this.cDefine24 = "";
            this.cDefine25 = "";
            this.cDefine26 = 0;
            this.cDefine27 = 0;
            this.cDefine28 = "";
            this.cDefine29 = "";
            this.cDefine30 = "";
            this.cDefine31 = "";
            this.cDefine32 = "";
            this.cDefine33 = "";
            this.cDefine34 = 0;
            this.cDefine35 = 0;
            this.cDefine36 = "";
            this.cDefine37 = "";
        }
    }


    /// <summary>
    /// 保存生单请求数据类
    /// </summary>
    public class SaveRequest
    {
        /// <summary>
        /// 外部系统请求GUID
        /// </summary>
        public string ExtSysRequestGUID;
        /// <summary>
        /// 单据类型代码
        /// </summary>
        public string VouchCode;
        /// <summary>
        /// 单据编号
        /// </summary>
        public string VoucherName;
        /// <summary>
        /// MES操作员
        /// </summary>
        public string MESUserName;
        /// <summary>
        /// 业务类型编号
        /// </summary>
        public string BusType;
        /// <summary>
        /// 部门编号
        /// </summary>
        public string DepCode;
        /// <summary>
        /// 仓库编号
        /// </summary>
        public string WhCode;
        /// <summary>
        /// 红蓝标识 (0蓝字/1红字)
        /// </summary>
        public int Bredvouch;
        /// <summary>
        /// 表头备注
        /// </summary>
        public string Memo;
        /// <summary>
        /// 表头自定义项1
        /// </summary>
        public string cDefine1;
        /// <summary>
        /// 表头自定义项12
        /// </summary>
        public string cDefine2;
        /// <summary>
        /// 表头自定义项3
        /// </summary>
        public string cDefine3;
        /// <summary>
        /// 表头自定义项4
        /// </summary>
        public string cDefine4;
        /// <summary>
        /// 表头自定义项5
        /// </summary>
        public int cDefine5;
        /// <summary>
        /// 表头自定义项6
        /// </summary>
        public string cDefine6;
        /// <summary>
        /// 表头自定义项7
        /// </summary>
        public float cDefine7;
        /// <summary>
        /// 表头自定义项8
        /// </summary>
        public string cDefine8;
        /// <summary>
        /// 表头自定义项9
        /// </summary>
        public string cDefine9;
        /// <summary>
        /// 表头自定义项10
        /// </summary>
        public string cDefine10;
        /// <summary>
        /// 表头自定义项11
        /// </summary>
        public string cDefine11;
        /// <summary>
        /// 表头自定义项12
        /// </summary>
        public string cDefine12;
        /// <summary>
        /// 表头自定义项13
        /// </summary>
        public string cDefine13;
        /// <summary>
        /// 表头自定义项14
        /// </summary>
        public string cDefine14;
        /// <summary>
        /// 表头自定义项15
        /// </summary>
        public int cDefine15;
        /// <summary>
        /// 表头自定义项16
        /// </summary>
        public float cDefine16;
        /// <summary>
        /// 行明细
        /// </summary>
        public List<SaveRequestItem> Rows;

        public SaveRequest()
        {
            this.ExtSysRequestGUID = "";
            this.VouchCode = "";
            this.VoucherName = "";
            this.MESUserName = "";
            this.BusType = "";
            this.DepCode = "";
            this.WhCode = "";
            this.Bredvouch = -1;
            this.Memo = "";
            this.cDefine1 = "";
            this.cDefine2 = "";
            this.cDefine3 = "";
            this.cDefine4 = "";
            this.cDefine5 = 0;
            this.cDefine6 = "";
            this.cDefine7 = 0;
            this.cDefine8 = "";
            this.cDefine9 = "";
            this.cDefine10 = "";
            this.cDefine11 = "";
            this.cDefine12 = "";
            this.cDefine13 = "";
            this.cDefine14 = "";
            this.cDefine15 = 0;
            this.cDefine16 = 0;
            this.Rows = new List<SaveRequestItem>();
        }
    }
    public class SaveRequestItem
    {
        /// <summary>
        /// 物料编码
        /// </summary>
        public string InvCode;
        /// <summary>
        /// 数量
        /// </summary>
        public decimal Quantity;
        /// <summary>
        /// 批次号
        /// </summary>
        public string Batch;
        /// <summary>
        /// 表体备注
        /// </summary>
        public string bMemo;
        /// <summary>
        /// 表体自定义项22
        /// </summary>
        public string cDefine22;
        /// <summary>
        /// 表体自定义项23
        /// </summary>
        public string cDefine23;
        /// <summary>
        /// 表体自定义项24
        /// </summary>
        public string cDefine24;
        /// <summary>
        /// 表体自定义项25
        /// </summary>
        public string cDefine25;
        /// <summary>
        /// 表体自定义项26
        /// </summary>
        public float cDefine26;
        /// <summary>
        /// 表体自定义项27
        /// </summary>
        public float cDefine27;
        /// <summary>
        /// 表体自定义项28
        /// </summary>
        public string cDefine28;
        /// <summary>
        /// 表体自定义项29
        /// </summary>
        public string cDefine29;
        /// <summary>
        /// 表体自定义项30
        /// </summary>
        public string cDefine30;
        /// <summary>
        /// 表体自定义项31
        /// </summary>
        public string cDefine31;
        /// <summary>
        /// 表体自定义项32
        /// </summary>
        public string cDefine32;
        /// <summary>
        /// 表体自定义项33
        /// </summary>
        public string cDefine33;
        /// <summary>
        /// 表体自定义项34
        /// </summary>
        public int cDefine34;
        /// <summary>
        /// 表体自定义项35
        /// </summary>
        public int cDefine35;
        /// <summary>
        /// 表体自定义项36
        /// </summary>
        public string cDefine36;
        /// <summary>
        /// 表体自定义项37
        /// </summary>
        public string cDefine37;

        public SaveRequestItem()
        {
            this.InvCode = "";
            this.Quantity = 0;
            this.Batch = "";
            this.bMemo = "";
            this.cDefine22 = "";
            this.cDefine23 = "";
            this.cDefine24 = "";
            this.cDefine25 = "";
            this.cDefine26 = 0;
            this.cDefine27 = 0;
            this.cDefine28 = "";
            this.cDefine29 = "";
            this.cDefine30 = "";
            this.cDefine31 = "";
            this.cDefine32 = "";
            this.cDefine33 = "";
            this.cDefine34 = 0;
            this.cDefine35 = 0;
            this.cDefine36 = "";
            this.cDefine37 = "";
        }
    }

}